package com.huluobo.a2112mvvmdouyindemo.like;

import androidx.lifecycle.MutableLiveData;

import com.huluobo.mvvm_base.bean.LikeBeanResult;
import com.huluobo.mvvm_base.bean.LikeVideoBeanResult;
import com.huluobo.mvvm_base.viewmodel.BaseViewModel;

/**
 * Created by LC on 2024/4/10.
 */
public class LikeViewModel extends BaseViewModel<LikeRepo> {
    MutableLiveData<LikeVideoBeanResult> success = new MutableLiveData<>();

    MutableLiveData<String> failed = new MutableLiveData<>();

    MutableLiveData<LikeBeanResult> cancelLikeSuccess = new MutableLiveData<>();

    MutableLiveData<String> cancelLikeFailed = new MutableLiveData<>();

    public void cancelLike(int videoId) {
        repo.cancelLike(videoId, cancelLikeSuccess, cancelLikeFailed);
    }

    public void getLikeVideoList() {
        repo.getLikeVideos(success, failed);
    }

    @Override
    protected LikeRepo createRepo() {
        return new LikeRepo();
    }
}
